import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test01 {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
        Class<?> clazz = Class.forName("Singelton01");
        Constructor<?> constructor = clazz.getDeclaredConstructor();
        constructor.setAccessible(true);
        Singelton01 instance1 = (Singelton01) constructor.newInstance();
        Singelton01 instance2 = Singelton01.getInstance();
        System.out.println(instance1 == instance2);
    }
}
